<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_detection_calibration".
 *
 * @property integer $id
 * @property string $paper_sn
 * @property integer $type
 * @property integer $order_num
 * @property string $code
 * @property string $color
 * @property string $n_value
 * @property string $result
 * @property string $order_sn
 * @property integer $status
 * @property string $description
 * @property string $update_time
 * @property string $create_time
 */
class TDetectionCalibration extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_detection_calibration';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['type', 'order_num', 'status'], 'integer'],
            [['code', 'color', 'order_sn', 'status', 'update_time', 'create_time'], 'required'],
            [['description'], 'string'],
            [['update_time', 'create_time'], 'safe'],
            [['paper_sn', 'result'], 'string', 'max' => 50],
            [['code'], 'string', 'max' => 10],
            [['color', 'n_value', 'order_sn'], 'string', 'max' => 20],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'paper_sn' => Yii::t('app', 'Paper Sn'),
            'type' => Yii::t('app', 'Type'),
            'order_num' => Yii::t('app', 'Order Num'),
            'code' => Yii::t('app', 'Code'),
            'color' => Yii::t('app', 'Color'),
            'n_value' => Yii::t('app', 'N Value'),
            'result' => Yii::t('app', 'Result'),
            'order_sn' => Yii::t('app', 'Order Sn'),
            'status' => Yii::t('app', 'Status'),
            'description' => Yii::t('app', 'Description'),
            'update_time' => Yii::t('app', 'Update Time'),
            'create_time' => Yii::t('app', 'Create Time'),
        ];
    }

    /**
     * @inheritdoc
     * @return \app\models\query\TDetectionCalibrationQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \app\models\query\TDetectionCalibrationQuery(get_called_class());
    }
}
